package com.lening.iot.aliyun.strategy;

import org.springframework.stereotype.Component;


@Component
public class StrategySelector {

    public static IotStrategy getStrategy(String productKey) {
        switch (productKey) {
            case "k1cx1fILrgl":
                System.out.println(productKey+"----------");
                return  new ParkinglotStrategy();
            case "k1cx1XHTZtC":
                System.out.println(productKey+"============---------");
                return  new IotsStrategy();
            default:
                throw new IllegalArgumentException("Unsupported product key: " + productKey);
        }
    }
}
